VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "ITGControls.ocx"
Begin VB.Form frmGLAmortization 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Recurring Accruals"
   ClientHeight    =   6930
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10080
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmGLAmortization.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   6930
   ScaleWidth      =   10080
   Begin TabDlg.SSTab SSTab1 
      Height          =   6435
      Left            =   60
      TabIndex        =   5
      Top             =   60
      Width           =   9960
      _ExtentX        =   17568
      _ExtentY        =   11351
      _Version        =   393216
      Tabs            =   2
      TabsPerRow      =   2
      TabHeight       =   520
      TabMaxWidth     =   3528
      TabCaption(0)   =   "Main"
      TabPicture(0)   =   "frmGLAmortization.frx":0CCA
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Frame1"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "List"
      TabPicture(1)   =   "frmGLAmortization.frx":0CE6
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "dtgList"
      Tab(1).ControlCount=   1
      Begin VB.Frame Frame1 
         Height          =   5955
         Left            =   120
         TabIndex        =   6
         Top             =   360
         Width           =   9720
         Begin VB.Frame Frame5 
            Height          =   1065
            Left            =   6705
            TabIndex        =   29
            Top             =   1290
            Width           =   2895
            Begin VB.CommandButton Command3 
               Height          =   300
               Left            =   2445
               Picture         =   "frmGLAmortization.frx":0D02
               Style           =   1  'Graphical
               TabIndex        =   31
               Top             =   225
               Width           =   315
            End
            Begin VB.CommandButton Command2 
               Height          =   300
               Left            =   2445
               Picture         =   "frmGLAmortization.frx":0E4C
               Style           =   1  'Graphical
               TabIndex        =   30
               Top             =   600
               Width           =   315
            End
            Begin ITGControls.ITGTextBox ITGTextBox4 
               Height          =   285
               Left            =   135
               TabIndex        =   32
               Top             =   240
               Width           =   2280
               _ExtentX        =   3810
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Label           =   "Debit Acct."
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1100
               TextBoxWidth    =   1120
               Required        =   -1  'True
            End
            Begin ITGControls.ITGTextBox ITGTextBox5 
               Height          =   285
               Left            =   135
               TabIndex        =   33
               Top             =   600
               Width           =   2280
               _ExtentX        =   3810
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Mandatory       =   -1  'True
               Label           =   "Credit Acct."
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1100
               TextBoxWidth    =   1120
               Required        =   -1  'True
            End
         End
         Begin VB.Frame Frame4 
            Height          =   735
            Left            =   3795
            TabIndex        =   25
            Top             =   2355
            Width           =   5805
            Begin VB.CommandButton Command1 
               Height          =   300
               Left            =   2385
               Picture         =   "frmGLAmortization.frx":0F96
               Style           =   1  'Graphical
               TabIndex        =   26
               Top             =   270
               Width           =   330
            End
            Begin ITGControls.ITGTextBox ITGTextBox2 
               Height          =   285
               Left            =   75
               TabIndex        =   27
               Top             =   270
               Width           =   2280
               _ExtentX        =   3810
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Mandatory       =   -1  'True
               Label           =   "Reference"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1100
               TextBoxWidth    =   1120
               Required        =   -1  'True
            End
            Begin ITGControls.ITGTextBox ITGTextBox3 
               Height          =   285
               Left            =   2760
               TabIndex        =   28
               TabStop         =   0   'False
               Top             =   270
               Width           =   2925
               _ExtentX        =   5054
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   14737632
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Label           =   "ITGtext"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   2865
               Enabled         =   0   'False
            End
         End
         Begin VB.Frame Frame3 
            Height          =   1065
            Left            =   3795
            TabIndex        =   15
            Top             =   1290
            Width           =   2850
            Begin ITGControls.ITGDateBox ITGDateBox1 
               Height          =   285
               Left            =   1380
               TabIndex        =   20
               Tag             =   "Date Needed"
               Top             =   225
               Width           =   1305
               _ExtentX        =   2302
               _ExtentY        =   503
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   ""
               SendKeysTab     =   -1  'True
            End
            Begin ITGControls.ITGLabel ITGLabel2 
               Height          =   285
               Left            =   180
               TabIndex        =   21
               Top             =   225
               Width           =   1005
               _ExtentX        =   1773
               _ExtentY        =   503
               Caption         =   "Start Date"
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
            End
            Begin ITGControls.ITGDateBox ITGDateBox2 
               Height          =   285
               Left            =   1380
               TabIndex        =   22
               Tag             =   "Date Needed"
               Top             =   600
               Width           =   1305
               _ExtentX        =   2302
               _ExtentY        =   503
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   ""
               SendKeysTab     =   -1  'True
            End
            Begin ITGControls.ITGLabel ITGLabel3 
               Height          =   285
               Left            =   180
               TabIndex        =   23
               Top             =   600
               Width           =   1005
               _ExtentX        =   1773
               _ExtentY        =   503
               Caption         =   "End Date"
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
            End
         End
         Begin VB.Frame Frame2 
            Height          =   1800
            Left            =   150
            TabIndex        =   13
            Top             =   1290
            Width           =   3585
            Begin VB.ComboBox cboDays 
               Appearance      =   0  'Flat
               BackColor       =   &H00FFFFFF&
               Height          =   315
               ItemData        =   "frmGLAmortization.frx":10E0
               Left            =   1395
               List            =   "frmGLAmortization.frx":1141
               Style           =   2  'Dropdown List
               TabIndex        =   17
               Top             =   945
               Width           =   930
            End
            Begin ITGControls.ITGTextBox txtGross 
               Height          =   285
               Left            =   165
               TabIndex        =   14
               TabStop         =   0   'False
               Top             =   240
               Width           =   3195
               _ExtentX        =   5424
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               DecimalPlace    =   2
               Locked          =   -1  'True
               Label           =   "Principal"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1250
               TextBoxWidth    =   1885
               LinkForeColor   =   0
            End
            Begin ITGControls.ITGTextBox ITGTextBox1 
               Height          =   285
               Left            =   165
               TabIndex        =   16
               TabStop         =   0   'False
               Top             =   585
               Width           =   2130
               _ExtentX        =   3545
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               Locked          =   -1  'True
               Label           =   "# of Months"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1250
               TextBoxWidth    =   820
               LinkForeColor   =   0
            End
            Begin ITGControls.ITGTextBox txtDays 
               Height          =   285
               Left            =   180
               TabIndex        =   18
               Tag             =   "cboType"
               Top             =   945
               Width           =   2130
               _ExtentX        =   3545
               _ExtentY        =   503
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Mandatory       =   -1  'True
               Label           =   "Every"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1250
               TextBoxWidth    =   820
               Required        =   -1  'True
            End
            Begin ITGControls.ITGTextBox txtAmount 
               Height          =   285
               Left            =   150
               TabIndex        =   19
               Top             =   1335
               Width           =   3210
               _ExtentX        =   5450
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   12648447
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Text            =   "0"
               DataType        =   1
               DecimalPlace    =   2
               Label           =   "Amount"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1250
               TextBoxWidth    =   1900
               Required        =   -1  'True
            End
            Begin VB.Label Label1 
               Caption         =   "of the month"
               Height          =   255
               Left            =   2400
               TabIndex        =   24
               Top             =   990
               Width           =   1140
            End
         End
         Begin VB.Timer Timer1 
            Interval        =   300
            Left            =   2790
            Top             =   150
         End
         Begin VB.ComboBox cboType 
            Appearance      =   0  'Flat
            BackColor       =   &H00FFFFFF&
            Height          =   315
            ItemData        =   "frmGLAmortization.frx":11F6
            Left            =   7545
            List            =   "frmGLAmortization.frx":1209
            Style           =   2  'Dropdown List
            TabIndex        =   2
            Top             =   225
            Width           =   1455
         End
         Begin ITGControls.ITGTextBox txtTranNo 
            Height          =   285
            Left            =   240
            TabIndex        =   0
            Top             =   240
            Width           =   2535
            _ExtentX        =   4260
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Transaction No."
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1250
            TextBoxWidth    =   1225
            Required        =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbDate 
            Height          =   285
            Left            =   4725
            TabIndex        =   1
            Tag             =   "Transaction Date"
            Top             =   240
            Width           =   1305
            _ExtentX        =   2302
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
            Mandatory       =   -1  'True
         End
         Begin ITGControls.ITGLabel ITGLabel4 
            Height          =   285
            Left            =   4155
            TabIndex        =   7
            Top             =   240
            Width           =   525
            _ExtentX        =   926
            _ExtentY        =   503
            Caption         =   "Date"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin MSDataGridLib.DataGrid dtgPR 
            Height          =   2100
            Left            =   195
            TabIndex        =   4
            Top             =   3660
            Width           =   9375
            _ExtentX        =   16536
            _ExtentY        =   3704
            _Version        =   393216
            AllowUpdate     =   -1  'True
            AllowArrows     =   -1  'True
            BackColor       =   16777215
            HeadLines       =   1
            RowHeight       =   15
            TabAcrossSplits =   -1  'True
            TabAction       =   2
            FormatLocked    =   -1  'True
            AllowDelete     =   -1  'True
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   6
            BeginProperty Column00 
               DataField       =   "cType"
               Caption         =   "Type"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   "cItemType"
               Caption         =   "Date"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column02 
               DataField       =   "cItemNo"
               Caption         =   "Transaction No."
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   "0.00"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column03 
               DataField       =   "cDesc"
               Caption         =   "Amount"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column04 
               DataField       =   "cUnit"
               Caption         =   "Interest"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column05 
               DataField       =   "nQty"
               Caption         =   "Reference"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   1
                  Format          =   "#,##0.00"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   1
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
                  Button          =   -1  'True
                  Locked          =   -1  'True
                  ColumnWidth     =   1140.095
               EndProperty
               BeginProperty Column01 
                  Button          =   -1  'True
                  Locked          =   -1  'True
                  ColumnWidth     =   1649.764
               EndProperty
               BeginProperty Column02 
                  Button          =   -1  'True
                  ColumnWidth     =   1560.189
               EndProperty
               BeginProperty Column03 
                  Locked          =   -1  'True
                  ColumnWidth     =   1470.047
               EndProperty
               BeginProperty Column04 
                  Button          =   -1  'True
                  Locked          =   -1  'True
                  ColumnWidth     =   1590.236
               EndProperty
               BeginProperty Column05 
                  Alignment       =   1
                  ColumnWidth     =   1395.213
               EndProperty
            EndProperty
         End
         Begin ITGControls.ITGTextBox txtType 
            Height          =   285
            Left            =   6705
            TabIndex        =   8
            Tag             =   "cboType"
            Top             =   240
            Width           =   2145
            _ExtentX        =   3572
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Mandatory       =   -1  'True
            Label           =   "Type"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1000
            TextBoxWidth    =   1085
            Required        =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtDesc 
            Height          =   285
            Left            =   240
            TabIndex        =   3
            Top             =   600
            Width           =   8745
            _ExtentX        =   15214
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Label           =   "Description"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1250
            TextBoxWidth    =   7435
            LinkForeColor   =   0
         End
         Begin VB.Label Label7 
            BackColor       =   &H0080C0FF&
            Caption         =   "     Payment History"
            BeginProperty Font 
               Name            =   "Tahoma"
               Size            =   9.75
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00404040&
            Height          =   255
            Left            =   30
            TabIndex        =   12
            Top             =   3270
            Width           =   9660
         End
         Begin VB.Label Label8 
            BackColor       =   &H0080C0FF&
            Caption         =   "     Description"
            BeginProperty Font 
               Name            =   "Tahoma"
               Size            =   9.75
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00404040&
            Height          =   255
            Left            =   30
            TabIndex        =   11
            Top             =   975
            Width           =   9660
         End
      End
      Begin MSDataGridLib.DataGrid dtgList 
         Height          =   5715
         Left            =   -74880
         TabIndex        =   9
         Top             =   420
         Width           =   8880
         _ExtentX        =   15663
         _ExtentY        =   10081
         _Version        =   393216
         AllowUpdate     =   0   'False
         AllowArrows     =   -1  'True
         Appearance      =   0
         HeadLines       =   1
         RowHeight       =   15
         TabAction       =   2
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   6
         BeginProperty Column00 
            DataField       =   "cPRNo"
            Caption         =   "Requisition No."
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "dDate"
            Caption         =   "Date"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   3
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "cType"
            Caption         =   "Type"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "cRefNo"
            Caption         =   "Reference Number"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column04 
            DataField       =   "dNeeded"
            Caption         =   "Date Needed"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   3
            EndProperty
         EndProperty
         BeginProperty Column05 
            DataField       =   "cDept"
            Caption         =   "Department"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            AllowRowSizing  =   0   'False
            BeginProperty Column00 
               ColumnAllowSizing=   -1  'True
               Locked          =   -1  'True
               ColumnWidth     =   1349.858
            EndProperty
            BeginProperty Column01 
               Locked          =   -1  'True
               ColumnWidth     =   1230.236
            EndProperty
            BeginProperty Column02 
               Locked          =   -1  'True
               ColumnWidth     =   1049.953
            EndProperty
            BeginProperty Column03 
               Locked          =   -1  'True
               ColumnWidth     =   1500.095
            EndProperty
            BeginProperty Column04 
               Locked          =   -1  'True
               ColumnWidth     =   1244.976
            EndProperty
            BeginProperty Column05 
               ColumnWidth     =   1980.284
            EndProperty
         EndProperty
      End
   End
   Begin MSComctlLib.StatusBar sbRS 
      Align           =   2  'Align Bottom
      Height          =   285
      Left            =   0
      TabIndex        =   10
      Top             =   6645
      Width           =   10080
      _ExtentX        =   17780
      _ExtentY        =   503
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   5
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   1
            Bevel           =   0
            Object.Width           =   4553
            MinWidth        =   2
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
End
Attribute VB_Name = "frmGLAmortization"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''IT Group Inc. 2005.09.23
'
'Option Explicit
'
''Object variables
'
'
'
'
'Private oPrint As New clsPrinting
'
'
''ADO Connection variables
'
'Private connHeader As ADODB.Connection
'Private connDetail As ADODB.Connection
'
''Recordset variables
'Private WithEvents rsHeader As ADODB.Recordset
'Private rsDetail As ADODB.Recordset
'
''Form mode enumeration
'Enum eAPPRMode
'    Normal
'    AddNewEdit
'    Find
'End Enum
'Public Mode As eAPPRMode
'
''Other declarations
'Public dtgName As String
'Public sBit As String
'Private vBM As Variant 'Recordset bookmark variable
'
'Private lSystemGenerated As Boolean
'Public strNo As String
'
''Security Acess Level variables
'Public lACNew As Boolean
'Public lACEdit As Boolean
'Public lACDelete As Boolean
'Public lACPost As Boolean
'Public lACCancel As Boolean
'Public lACPrint As Boolean
'
'Private Sub cboPR_Click()
'    If dtgPR.Col = 1 Then
'        rsDetail!cItemType = cboPR
'    End If
'End Sub
'
'Private Sub cboPR_KeyDown(KeyCode As Integer, Shift As Integer)
'    If KeyCode = 13 Then
'        If dtgPR.Col = 1 Then
'            rsDetail!cItemType = cboPR
'            cboPR.Visible = False
'            dtgPR.Col = 2
'            dtgPR.SetFocus
'        End If
'    ElseIf KeyCode = vbKeyEscape Then
'        cboPR.Visible = False
'    End If
'End Sub
'
'Private Sub cboPR_LostFocus()
'    cboPR.Visible = False
'End Sub
'
'Private Sub cboPRType_Click()
'    If dtgPR.Col = 0 Then
'        rsDetail!cType = cboPRType
'    ElseIf dtgPR.Col = 4 Then
'        rsDetail!cUnit = cboPRType
'    End If
'End Sub
'
'Private Sub cboPRType_KeyDown(KeyCode As Integer, Shift As Integer)
'    If KeyCode = 13 Then
'        If dtgPR.Col = 0 Then
'            rsDetail!cType = cboPRType
'            cboPRType.Visible = False
'            dtgPR.Col = 1
'            dtgPR.SetFocus
'        End If
'    ElseIf KeyCode = vbKeyEscape Then
'        cboPRType.Visible = False
'    End If
'End Sub
'
'Private Sub cboPRType_LostFocus()
'    cboPRType.Visible = False
'End Sub
'
'Private Sub cboType_Click()
'    txtType = Trim(cboType)
'    If Mode <> AddNewEdit Then Exit Sub
'    If Trim(cboType) = "For stock" Then
'        txtRefNo.TabStop = False
'        cmdPickSO.TabStop = False
'        txtRefNo.Locked = True
'        cmdPickSO.Enabled = False
'    Else
'        txtRefNo.TabStop = True
'        cmdPickSO.TabStop = True
'        txtRefNo.Locked = True
'        cmdPickSO.Enabled = True
'    End If
'    ClearDetails
'End Sub
'
'Private Sub cboType_KeyPress(KeyAscii As Integer)
'    SendKeysTab KeyAscii
'End Sub
'
'Private Sub cboUnit_Change()
'    rsDetail!cUnit = cboUnit
'    rsDetail!nFactor = GetValueFrTable("nFactor", "Item_Unit", "cItemNo = '" & Trim(rsDetail!cItemNo) & "' and cUnit = '" & Trim(rsDetail!cUnit) & "'")
'End Sub
'
'Private Sub cboUnit_Click()
'    rsDetail!cUnit = cboUnit
'    rsDetail!nFactor = GetValueFrTable("nFactor", "Item_Unit", "cItemNo = '" & Trim(rsDetail!cItemNo) & "' and cUnit = '" & Trim(rsDetail!cUnit) & "'")
'End Sub
'
'Private Sub cboUnit_KeyDown(KeyCode As Integer, Shift As Integer)
'    If KeyCode = 13 Then
'        If dtgPR.Col = 4 Then
'            rsDetail!cUnit = cboUnit
'            rsDetail!nFactor = GetValueFrTable("nFactor", "Item_Unit", "cItemNo = '" & Trim(rsDetail!cItemNo) & "' and cUnit = '" & Trim(rsDetail!cUnit) & "'")
'            dtgPR.Col = 5
'            dtgPR.SetFocus
'            cboUnit.Visible = False
'        End If
'    ElseIf KeyCode = vbKeyEscape Then
'        cboUnit.Visible = False
'    End If
'End Sub
'
'Private Sub cboUnit_KeyPress(KeyAscii As Integer)
'    If KeyAscii = 13 Then
'        If dtgPR.Col = 4 Then
'            rsDetail!cUnit = cboUnit
'            rsDetail!nFactor = GetValueFrTable("nFactor", "Item_Unit", "cUnit = '" & Trim(rsDetail!cItemNo) & "' and cUnit = '" & Trim(rsDetail!cUnit) & "'")
'            dtgPR.Col = 5
'            dtgPR.SetFocus
'        End If
'    ElseIf KeyAscii = vbKeyEscape Then
'    End If
'    cboUnit.Visible = False
'End Sub
'
'Private Sub cboUnit_LostFocus()
'    cboUnit.Visible = False
'End Sub
'
'Private Sub cmdPickDeptID_Click()
'    If lPickListActive Then Exit Sub
'    frmITGPicker.zType = QSecDepartment
'    frmITGPicker.Show vbModal
'    txtDepartment = frmITGPicker.zCode
'    txtDeptDesc = frmITGPicker.zName
'    If Trim(txtDeptDesc) <> "" Then SendKeys "{Tab}"
'End Sub
'
'Private Sub cmdPickEmpCode_Click()
'    If lPickListActive Then Exit Sub
'    frmITGPicker.zType = QEmployee
'    frmITGPicker.Show vbModal
'    txtRequestedBy = frmITGPicker.zCode
'    txtEmpName = frmITGPicker.zName
'    txtDepartment = GetValueFrTable("cDept", "EMPLOYEE", "cEmpCode = '" & Trim(txtRequestedBy.Text) & "'")
'    If Trim(txtEmpName) <> "" Then txtPurpose.SetFocus
'End Sub
'
'Private Sub cmdPickSO_Click()
'    If Mode <> AddNewEdit Then Exit Sub
'    If Trim(cboType) = "" Then
'        MsgBox "Please select transaction type.", vbInformation, "ComUnion"
'        cboType.SetFocus
'        Exit Sub
'    End If
'    If Trim(cboType) = "For stock" Then Exit Sub
'    If Trim(cboType) = "From SO" Then
'        frmARDRList.mDRType = APSOForBuyOut
'    ElseIf Trim(cboType) = "Production" Then
'        frmARDRList.mDRType = APPOForBuyOut
'    ElseIf Trim(cboType) = "From RS" Then
'        frmARDRList.mDRType = RequestForPR
'    End If
'    frmARDRList.Show vbModal
'    'Me.txtRefNo = frmARDRList.txtCode
'    If Trim(txtRefNo) <> "" Then
'        SendKeys "{Tab}"
'    End If
'End Sub
'
'Private Sub dtgList_HeadClick(ByVal ColIndex As Integer)
'    SortGrid dtgList, ColIndex, rsHeader
'End Sub
'
'Private Sub dtgPR_AfterColUpdate(ByVal ColIndex As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    Select Case ColIndex
'        Case 2
'            If dtgPR.Columns(0).Text <> "Existing" Then Exit Sub
'            If dtgPR.Columns(1).Text = "" Then Exit Sub
'            If Trim(dtgPR.Columns(1).Text) = "Trade" Then
'                If GetValueFrTable("cItemNo", "ITEM", "cItemNo = '" & Trim(dtgPR.Columns(2).Value) & "'") <> "" Then
'                    GetInitialItemValues rsDetail
'                    dtgPR.Col = 5
'                    dtgPR.Columns(5).Value = 0
'                    rsDetail!nFactor = 1
'                End If
'            ElseIf Trim(dtgPR.Columns(1).Text) = "Asset" Then
'                If GetValueFrTable("cAssetNo", "ASSET", "cAssetNo = '" & Trim(dtgPR.Columns(2).Value) & "'") <> "" Then
'                    dtgPR.Col = 5
'                    dtgPR.Columns(5).Value = 0
'                End If
'            ElseIf Trim(dtgPR.Columns(1).Text) = "Supply" Then
'                If GetValueFrTable("cSupplyNo", "SUPPLY", "cSupplyNo = '" & Trim(dtgPR.Columns(2).Value) & "'") <> "" Then
'                    dtgPR.Col = 5
'                    dtgPR.Columns(5).Value = 0
'                End If
'            End If
'    End Select
'End Sub
'
'Private Sub dtgPR_ButtonClick(ByVal ColIndex As Integer)
''If Mode <> AddNewEdit Then Exit Sub
'If Mode = AddNewEdit Then 'Exit Sub
'    Select Case ColIndex
'        Case 0
'            Call MoveCombo(cboPRType, dtgPR, dtgPR.Columns(0))
'            ComboLoadValue cboPRType, Trim(dtgPR.Columns(0).Text)
'        Case 1
'            Call MoveCombo(cboPR, dtgPR, dtgPR.Columns(1))
'            ComboLoadValue cboPR, Trim(dtgPR.Columns(1).Text)
'        Case 2
'            If dtgPR.Columns(0).Text <> "Existing" Then Exit Sub
'            If dtgPR.Columns(1).Text = "" Then Exit Sub
'            If dtgPR.Columns(1).Text = "Trade" Then
'                If lPickListActive Then Exit Sub
'                sFilterString = Trim(dtgPR.Columns(2).Text)
'                frmITGPicker.zType = QProduct
'                frmITGPicker.sPCCode = sDivision
'                frmITGPicker.Show vbModal
'                rsDetail!cItemNo = Trim(frmITGPicker.zCode) & ""
'                If (Trim(frmITGPicker.zName) & "") <> "" Then
'                    GetInitialItemValues rsDetail
'                    dtgPR.Col = 4
'                    dtgPR.Columns(5).Value = 0
'                    rsDetail!nFactor = IIf(GetValueFrTable("nFactor", "ITEM_Unit", "cItemNo = '" & Trim(rsDetail!cItemNo) & "' and cUnit = '" & Trim(rsDetail!cUnit) & "'"), 1, GetValueFrTable("nFactor", "ITEM_Unit", "cItemNo = '" & Trim(rsDetail!cItemNo) & "' and cUnit = '" & Trim(rsDetail!cUnit) & "'"))
'                End If
'            ElseIf dtgPR.Columns(1).Text = "Asset" Then
'                If lPickListActive Then Exit Sub
'                sFilterString = Trim(dtgPR.Columns(2).Text)
'                frmITGPicker.zType = QFixedAsset
'                frmITGPicker.sPCCode = sDivision
'                frmITGPicker.Show vbModal
'                rsDetail!cItemNo = Trim(frmITGPicker.zCode) & ""
'                If (Trim(frmITGPicker.zName) & "") <> "" Then
'                    GetInitialAssetValues rsDetail
'                    dtgPR.Col = 4
'                    dtgPR.Columns(5).Value = 0
'                End If
'            ElseIf dtgPR.Columns(1).Text = "Supply" Then
'                If lPickListActive Then Exit Sub
'                sFilterString = Trim(dtgPR.Columns(2).Text)
'                frmITGPicker.zType = QSupply
'                frmITGPicker.sPCCode = sDivision
'                frmITGPicker.Show vbModal
'                rsDetail!cItemNo = Trim(frmITGPicker.zCode) & ""
'                If (Trim(frmITGPicker.zName) & "") <> "" Then
'                    GetInitialSupplyValues rsDetail
'                    dtgPR.Col = 4
'                    dtgPR.Columns(5).Value = 0
'                End If
'            End If
'        Case 4
'            Call LoadComboValues(cboUnit, "cUnit", "Item_Unit", "WHERE cCompanyID = '" & COID & "' and cItemNo = '" & Trim(rsDetail!cItemNo) & "'")
'            Call MoveCombo(cboUnit, dtgPR, dtgPR.Columns(4))
'            ComboLoadValue cboUnit, Trim(dtgPR.Columns(4).Text)
'    End Select
'Else
'    Select Case ColIndex
'        Case 2
'            If Mode <> Find Then
'                If Trim(dtgPR.Columns(2).Text) <> "" Then
'                    frmMaintProduct.Show
'                    frmMaintProduct.ZOrder
'                    frmMaintProduct.ShowForm LTrim(RTrim(dtgPR.Columns(2).Text))
'                End If
'            End If
'    End Select
'End If
'End Sub
'
''Set the datagrid as active control
'Private Sub dtgPR_Click()
'    If Mode = AddNewEdit Then dtgName = dtgPR.Name
'End Sub
'
'Private Sub dtgPR_Error(ByVal DataError As Integer, Response As Integer)
'    Response = 0
'End Sub
'
'Private Sub dtgPR_GotFocus()
'    dtgName = dtgPR.Name
'End Sub
'
'Private Sub dtgPR_KeyDown(KeyCode As Integer, Shift As Integer)
'    If Mode <> AddNewEdit Then Exit Sub
'    If (Shift = vbCtrlMask And KeyCode = 45) Then
'        TBNewLine
'    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
'        TBDeleteLine
'    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
'        TBSave
'    End If
'End Sub
'
'Private Sub dtgPR_KeyPress(KeyAscii As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    If rsDetail.RecordCount = 0 Then Exit Sub
'
'    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
'    If KeyAscii = 13 Then
'        Select Case dtgPR.Col
'            Case 0
'                If Not cboPRType.Visible Then dtgPR_ButtonClick (0)
'            Case 1
'                If Not cboPR.Visible Then dtgPR_ButtonClick (1)
'            Case 2
'                If dtgPR.Columns(0).Text <> "Existing" Then Exit Sub
'                If dtgPR.Columns(1).Text = "" Then Exit Sub
'                If dtgPR.Columns(1).Text = "Trade" Then
'                    If GetValueFrTable("cItemNo", "ITEM", "cItemNo = '" & Trim(dtgPR.Columns(2).Value) & "'") = "" Then
'                        If Trim(dtgPR.Columns(1).Text) = "Trade" Then dtgPR_ButtonClick (2)                      'use button click
'                    End If
'                ElseIf dtgPR.Columns(1).Text = "Asset" Then
'                    If GetValueFrTable("cAssetNo", "ASSET", "cAssetNo = '" & Trim(dtgPR.Columns(2).Value) & "'") = "" Then
'                        If Trim(dtgPR.Columns(1).Text) = "Asset" Then dtgPR_ButtonClick (2)                      'use button click
'                    End If
'                ElseIf dtgPR.Columns(1).Text = "Supply" Then
'                    If GetValueFrTable("cSupplyNo", "SUPPLY", "cSupplyNo = '" & Trim(dtgPR.Columns(2).Value) & "'") = "" Then
'                        If Trim(dtgPR.Columns(1).Text) = "Supply" Then dtgPR_ButtonClick (2)                      'use button click
'                    End If
'                End If
'            'Case 4
'            '    dtgPR.LeftCol = 5
'            Case 5
'                TBNewLine
'                dtgPR.LeftCol = 0
'            Case Else
'                SendKeys "{Tab}"
'        End Select
'    Else: KeyAscii = Asc(UCase(Chr(KeyAscii)))       'All Upper Case String
'    End If
'End Sub
'
''Right click menu popup
'Private Sub dtgPR_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
'    If Mode <> AddNewEdit Then Exit Sub
'    If Button = 2 Then
'        dtgName = dtgPR.Name
'        PopupMenu ITGLedgerMain.mnuDetail
'    End If
'End Sub
'
'Private Sub dtgPR_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
'On Error Resume Next
'    If Mode <> AddNewEdit Then Exit Sub
'
'    If Trim(dtgPR.Columns(0).Text) = "New" Then
'        dtgPR.Columns(3).Locked = False
'        dtgPR.Columns(4).Locked = False
'    Else
'        dtgPR.Columns(3).Locked = True
'        dtgPR.Columns(4).Locked = True
'    End If
'End Sub
'
''Set Your Object
'Private Sub Form_Load()
'
'    AcessBit Me, GetValueFrTable("AccessLevel", "SEC_ACCESSLEVEL", "RoleID = '" & SecUserRole & "' AND [Module] = 'AP01'")
'    Set rsHeader = New ADODB.Recordset
'    Set rsDetail = New ADODB.Recordset
'
'    Set FrmName = Me
'    FormLocking True
'    FormSearch True
'    SearchObj True
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
'    BitVisible ITGLedgerMain.tbrMain, True, True
'    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
'    Mode = Find
'    txtPRNo.Locked = False
'End Sub
'
''Activate your Toolbar Mode
'Private Sub Form_Activate()
'    TBBitReload
'End Sub
'
''Release your Object
'Private Sub Form_Unload(Cancel As Integer)
'On Error Resume Next
'    If Mode = AddNewEdit Then
'        MsgBox "Unable to close. You are in Add/New/Edit mode." & vbCr & _
'            " Must Save or Undo", vbCritical, Me.Caption
'        Cancel = True
'        Exit Sub
'    End If
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
'    BitVisible ITGLedgerMain.tbrMain
'    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = False
'
'
'
'
'
'    Set oPrint = Nothing
'    Set rsHeader = Nothing
'    Set rsDetail = Nothing
'    Set connHeader = Nothing
'    Set connDetail = Nothing
'
'    Set frmAPPurchaseRequest = Nothing
'
'    lCloseWindow = True
'End Sub
'
''Add new record to the recordset
'Public Sub TBNew()
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
'    txtPRNo.BackColor = &HE0FFFF
'    Mode = AddNewEdit
'
'    If rsHeader.State <> adStateOpen Then
'        OpenNewConnection connHeader
'        OpenNewConnection connDetail
'        OpenRecordsetWithCN rsDetail, "*", "REQUISITION_T", connDetail, "WHERE 1 = 0"
'        OpenRecordsetWithCN rsHeader, "*", "REQUISITION", connHeader, "WHERE 1 = 0"
'        SetDataSource
'        SetDataField
'    Else
'        vBM = rsHeader.Bookmark
'    End If
'
'    rsHeader.AddNew
'    rsHeader!cCompanyID = COID
'    rsHeader!dDate = Date
'
'    'Automatic Approval
'    'rsHeader!lApproved = True
'
'    Set FrmName = Me
'    FormLocking False
'    ClrRequired &HC0&
'    txtRefNo.Locked = True
'    SSTab1.Tab = 0
'    txtPRNo.SetFocus
'
'    rsHeader!cType = "For stock"
'
'    'system generated number
'    lSystemGenerated = GetValueFrTable("lBit", "SYSTEM_OPTION", "cCode = 'AUTO_NUMBER_PR' ")
'    If lSystemGenerated Then rsHeader!cPRNo = GetAutoCtrlNo(rsHeader, "AUTO_NUMBER_PR", "REQUISITION", "cPRNo")
'
'End Sub
'
''Undo all changes to the recordset
'Public Sub TBUndoAll()
'On Error GoTo ErrorHandler
'
'    Mode = Normal
'
'    If rsHeader.Status = adRecNew Then TBUndoCurrent
'
'    rsHeader.CancelBatch adAffectAll
'    rsDetail.CancelBatch adAffectAll
'
'    UnbindControls
'
'    If rsHeader.RecordCount <> 0 Then rsHeader.Bookmark = vBM
'
'    Set FrmName = Me
'    FormLocking True
'
'    If rsHeader.RecordCount <> 0 Then
'        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , lACPost, lACCancel, , , True, True, lACPrint, True
'    Else
'        RSZero
'        Mode = Find
'    End If
'
'    sbRS.Panels(2) = ""
'
'    SetDataSource
'    SetDataField
'
'ErrorHandler:
'
'    cboPR.Visible = False
'    cboPRType.Visible = False
'
'    If Err.Number = -2147217885 Then
'        Resume Next
'    ElseIf Err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
'        TBUndoAll
'    End If
'
'End Sub
'
''Undo changes on the current record
'Public Sub TBUndoCurrent()
'On Error GoTo ErrorHandler
'
'    GetChild
'    If rsHeader.Status = adRecNew Then
'        rsDetail.CancelBatch adAffectAll
'        rsHeader.CancelUpdate
'    Else
'        rsHeader.CancelBatch adAffectCurrent
'        rsDetail.CancelBatch adAffectAll
'    End If
'
'    If rsHeader.RecordCount = 0 Then RSZero
'
'ErrorHandler:
'    If Err.Number = -2147217885 Then
'        Resume Next
'    ElseIf Err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
'        TBUndoCurrent
'    End If
'
'End Sub
'
''Save all changes
'
'Public Sub TBSave()
'Dim OKUpdate As Boolean
'On Error GoTo ErrHandler
'
'    'Audit Trail
'    lBoolean = False
'    If rsHeader.Status = adRecNew Then lBoolean = True
'
'    If Not MandatoryOK Then Exit Sub
'
'    'System generated number
'    If rsHeader.Status = adRecNew Then
'        If lSystemGenerated Then
'            If ChkCtrlNo(rsHeader, "AUTO_NUMBER_PR", "REQUISITION", "cPRNo", rsHeader!cPRNo) <> rsHeader!cPRNo Then
'                GetChild
'
'                rsHeader!cPRNo = strNo
'
'                If rsDetail.RecordCount <> 0 Then rsDetail.MoveFirst
'                Do Until rsDetail.EOF
'                    rsDetail!cPRNo = strNo
'                    rsDetail.MoveNext
'                Loop
'
'                GetChild
'            End If
'        End If
'    End If
'    '----------------------
'
'    OKUpdate = False
'    cn.BeginTrans
'    connHeader.BeginTrans
'    connDetail.BeginTrans
'
'    rsHeader.UpdateBatch adAffectAll
'    rsDetail.UpdateBatch adAffectAll
'
'    cn.CommitTrans
'    connHeader.CommitTrans
'    connDetail.CommitTrans
'    OKUpdate = True
'
'    Set FrmName = Me
'    FormLocking True
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , lACPost, lACCancel, , , True, True, lACPrint, True
'    Mode = Normal
'
'    'Audit trail
'    UpdateLogFile "Purchase Request", Trim(txtPRNo), IIf(lBoolean, "Inserted", "Updated")
'
'    'For Notification
'
'
'    'update system generated number
'    If lBoolean Then
'        If lSystemGenerated And strNo = rsHeader!cPRNo Then UpdateControlNo strNo, rsHeader!cPRNo, "AUTO_NUMBER_PR"
'    End If
'    '----------------------
'
'    MsgBox "Record/s successfully saved.", vbInformation, "ComUnion"
'    sbRS.Panels(2) = ""
'
'
'ErrHandler:
'
'    cboPR.Visible = False
'    cboPRType.Visible = False
'
'    If Err.Number = -2147217885 Then
'        Resume Next
'    ElseIf Err.Number = -2147217864 Then
'        OKUpdate = True
'        cn.RollbackTrans
'        connHeader.RollbackTrans
'        connDetail.RollbackTrans
'        MsgBox "Record cannot be updated. Some values may have been changed by other user/s since last read." & vbCr & _
'                "Records will be automatically refreshed. All changes made to the record will be gone upon refresh.", vbInformation, "ComUnion"
'        vBookMark = rsHeader.Bookmark
'        UnbindControls
'        rsHeader.Requery
'        rsDetail.Requery
'        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , lACPost, lACCancel, , , True, True, lACPrint, True
'        Mode = Normal
'        If rsHeader.RecordCount <> 0 Then
'            Set FrmName = Me
'            FormLocking True
'            SetDataField
'            SetDataSource
'            rsHeader.Bookmark = vBookMark
'        Else
'            RSZero
'        End If
'    End If
'    If Not OKUpdate Then
'        MsgBox "Transaction update failed.", vbInformation, "ComUnion"
'        cn.RollbackTrans
'        connHeader.RollbackTrans
'        connDetail.RollbackTrans
'        ErrorLog Err.Number, Err.Description, Me.Name 'Error log
'    End If
'
'End Sub
'
''Sets the form & recorset to add/edit mode
'Public Sub TBEdit()
'    If rsHeader!lCancelled = True Then
'        MsgBox "Transaction was already cancelled. Edit is not allowed.", vbExclamation, "ComUnion"
'        Exit Sub
'    ElseIf rsHeader!lApproved Then
'        MsgBox "Transaction was already approved. Edit is not allowed.", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'
'    Mode = AddNewEdit
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
'    Set FrmName = Me
'    FormLocking False
'    ClrRequired &HC0&
'    txtRefNo.Locked = True
'    txtPRNo.Locked = True
'    SSTab1.Tab = 0
'    dtbDate.SetFocus
'    vBM = rsHeader.Bookmark
'End Sub
'
''Delete record
'Public Sub TBDelete()
'On Error GoTo ErrorHandler
'
'    sID = Trim(txtPRNo)
'
'    If rsHeader.RecordCount = 0 Then Exit Sub
'
'    If rsHeader!lCancelled = True Then
'        MsgBox "Transaction was already cancelled. Deletion is not allowed.", vbExclamation, "ComUnion"
'        Exit Sub
'    ElseIf rsHeader!lApproved Then
'        MsgBox "Transaction was already approved. Deletion is not allowed.", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'
'    If MsgBox("Are you sure you want to delete this record?", vbQuestion + vbYesNo, "ComUnion") = vbNo Then Exit Sub
'
'    GetChild
'    If rsDetail.RecordCount <> 0 Then
'        rsDetail.MoveFirst
'        Do Until rsDetail.RecordCount = 0
'            rsDetail.Delete adAffectCurrent
'            If rsDetail.RecordCount <> 0 Then rsDetail.MoveFirst
'        Loop
'    End If
'
'    'Audit trail
'    UpdateLogFile "Purchase Request", Trim(txtPRNo), "Deleted"
'
'    rsHeader.Delete adAffectCurrent
'
'    rsDetail.UpdateBatch adAffectAll
'    rsHeader.UpdateBatch adAffectAll
'
'    TBPrevRec
'
'    Mode = Normal
'
'    If rsHeader.RecordCount = 0 Then
'        RSZero
'    End If
'
'ErrorHandler:
'    If Err.Number = -2147217885 Then
'        Resume Next
'    ElseIf Err.Number = -2147217864 Then
'        cn.Execute "DELETE REQUISITION_T WHERE cPRNo = '" & sID & "' AND cCompanyID = '" & COID & "'"
'        cn.Execute "DELETE REQUISITION WHERE cPRNo = '" & sID & "' AND cCompanyID = '" & COID & "'"
'        Resume Next
'    End If
'
'End Sub
'
''Search using the frmITGSearch
'Public Sub TBFind()
'    Mode = Normal
'    txtPRNo.Locked = True
'    frmITGSearch.Show 'vbModal
'End Sub
'
''Search using the recordset primary key
'Public Sub TBFindPrimary()
'Dim sTemp As String
'If Mode = Find Then
'    FormWaitShow App.Path & "\Transmit.avi", "Loading data . . ."
'
'    OpenNewConnection connHeader
'    OpenNewConnection connDetail
'
'    Set rsHeader = Nothing
'    Set rsDetail = Nothing
'    Set rsHeader = New ADODB.Recordset
'    Set rsDetail = New ADODB.Recordset
'
'    sTemp = Trim$(GetSearchString)
'    If sTemp = "ERROR" Then
'        MsgBox "Only Allows A - Z, 0 - 9, '.', ',' and %(wildcard)", vbExclamation, ""
'        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
'        txtPRNo.Locked = False
'        txtPRNo.SetFocus
'        Exit Sub
'    End If
'
'    OpenRecordsetWithCN rsHeader, "*", "REQUISITION", connHeader, IIf(sTemp = "", "", " WHERE " & sTemp)
'    OpenRecordsetWithCN rsDetail, "*", "REQUISITION_T", connDetail
'
'    Set FrmName = Me
'    FormLocking True
'
'    If rsHeader.RecordCount = 0 Then
'        FormWaitHide
'        MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
'        RSZero
'        FormSearch True
'        SearchObj True
'        Mode = Find
'        Exit Sub
'    End If
'    SetDataSource
'    SetDataField
'    txtPRNo.BackColor = &HE0FFFF
'    Mode = Normal
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , lACPost, lACCancel, , , True, True, lACPrint, True
'
'    FormWaitHide
'Else
'    RSZero
'    FormSearch True
'    SearchObj True
'    Mode = Find
'End If
'
'End Sub
'
''Reload menu buttons (do not delete this sub)
'Public Sub TBBitReload()
'    BitVisible ITGLedgerMain.tbrMain, True, True
'    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
'    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
'    Set FrmName = Me
'    dtgName = dtgPR.Name
'End Sub
'
''Close active window
'Public Sub TBCloseWindow()
'    Unload Me
'End Sub
'
''Move first
'Public Sub TBFirstRec()
'    If rsHeader.State <> adStateOpen Then Exit Sub
'    MoveFirst rsHeader
'End Sub
'
''Move previuos
'Public Sub TBPrevRec()
'    If rsHeader.State <> adStateOpen Then Exit Sub
'    MovePrevious rsHeader
'End Sub
'
''Move next
'Public Sub TBNextRec()
'    If rsHeader.State <> adStateOpen Then Exit Sub
'    MoveNext rsHeader
'End Sub
'
''Move last
'Public Sub TBLastRec()
'    If rsHeader.State <> adStateOpen Then Exit Sub
'    MoveLast rsHeader
'End Sub
'
''Add new line to the detail recordset
'Public Sub TBNewLine()
'
'    If rsHeader!cPRNo = "" Then Exit Sub
'
'    If dtgName = "dtgPR" Then
'        rsDetail.AddNew
'        rsDetail!cCompanyID = COID
'        rsDetail!cPRNo = Trim(rsHeader!cPRNo)
'        GetChild
'        If rsDetail.RecordCount <> 0 Then rsDetail.MoveLast
'        dtgPR.Col = 0
'        dtgPR.Columns(0).Value = ""
'        dtgPR.SetFocus
'    End If
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
'
'End Sub
'
''Delete line in the detail recordset
'Public Sub TBDeleteLine()
'On Error GoTo ErrorHandler
'
'    If dtgName = dtgPR.Name Then
'        If rsDetail.RecordCount = 0 Then Exit Sub
'        vBookMark = dtgPR.Bookmark
'        GetChild
'        dtgPR.Bookmark = vBookMark
'        rsDetail.Delete adAffectCurrent
'    End If
'    GetChild
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
'
'ErrorHandler:
'    If Err.Number = -2147217885 Then
'        Resume Next
'    End If
'
'End Sub
'
''Undo All
'Public Sub TBUndoLineAll()
'On Error GoTo ErrorHandler
'
'    MsgBox "Unavailable on " & Me.Name
'
'ErrorHandler:
'    If Err.Number = -2147217885 Then
'        Resume Next
'    End If
'
'End Sub
'
''Undo current line
'Public Sub TBUndoLineCurrent()
'    MsgBox "Unavailable on " & Me.Name
'End Sub
'
''Post current record
'Public Sub TBPostRecord()
'    'MsgBox "Unavailable on " & Me.Name
'
'    If rsHeader.RecordCount = 0 Then Exit Sub
'
'    If rsHeader!lCancelled = True Then
'        MsgBox "Transaction was already cancelled. Approval is not allowed", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'
'    If rsHeader!lApproved = True Then
'        MsgBox "Transaction was already approved.", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'
'    If MsgBox("Are you sure you want to approve this record?", vbQuestion + vbYesNo, "ComUnion") = vbNo Then Exit Sub
'
'    'Audit trail
'    UpdateLogFile "Purchase Request", Trim(txtPRNo), "Approved"
'
'    rsHeader!lApproved = True
'    rsHeader.UpdateBatch adAffectAll
'
'    sbRS.Panels(5) = "APPROVED"
'    Mode = Normal
'
'
'
'TheSource:
'    If Err.Number = -2147217885 Then
'        Resume Next
'    End If
'End Sub
'
''Cancel current record
'Public Sub TBCancelRecord()
'On Error GoTo ErrorHandler
'
'    If rsHeader.RecordCount = 0 Then Exit Sub
'
'    If rsHeader!lCancelled = True Then
'        MsgBox "Transaction was already cancelled.", vbExclamation, "ComUnion"
'        Exit Sub
'    ElseIf rsHeader!lApproved Then
'        MsgBox "Transaction was already approved. Cancel is not allowed.", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'
'    If MsgBox("Are you sure you want to cancel this record?", vbQuestion + vbYesNo, "ComUnion") = vbNo Then Exit Sub
'
'    'Audit trail
'    UpdateLogFile "Purchase Request", Trim(txtPRNo), "Cancelled"
'
'    cn.Execute ("UPDATE REQUISITION SET lCancelled = 1 WHERE cPRNo = '" & Trim(txtPRNo) & "' AND cCompanyID = '" & COID & "'")
'
'    sbRS.Panels(5) = "CANCELLED"
'    Mode = Normal
'
'    rsHeader!lCancelled = True
'    rsHeader.UpdateBatch adAffectAll
'
'ErrorHandler:
'    If Err.Number = -2147217885 Then
'        Resume Next
'    End If
'
'End Sub
'
''Print
'Public Sub TBPrintRecord()
'    cModule = "Purchase_Requisition"
'    oPrint.PrintReceipt Trim(txtPRNo)
'End Sub
'
''Sets the data source of the controls
'Sub SetDataSource()
'    Set FrmName = Me
'    BindControls rsHeader
'    Set dtgList.DataSource = rsHeader
'    Set dtgPR.DataSource = rsDetail
'End Sub
'
''Sets the data field for every bounded controls
'Sub SetDataField()
'    With rsHeader
'        txtPRNo.DataField = !cPRNo
'        dtbDate.DataField = !dDate
'        txtType.DataField = !cType
'        txtRefNo.DataField = !cRefNo
'        dtbNeeded.DataField = !dNeeded
'        txtRequestedBy.DataField = !cRequestedBy
'        txtDepartment.DataField = !cDepartment
'        txtPurpose.DataField = !cPurpose
'        txtRemarks.DataField = !cRemarks
'    End With
'End Sub
'
'Private Sub rsHeader_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'On Error GoTo ErrorHandler
'
'    If Not (rsHeader.EOF) Or Not (rsHeader.BOF) Then
'        'Status bar setup
'        sbRS.Panels(1) = "Record: " & IIf((rsHeader.AbsolutePosition = -2), "0", rsHeader.AbsolutePosition) & "/" & rsHeader.RecordCount
'
'        If rsHeader.Status <> adRecNew Then
'            txtPRNo.Locked = True
'        Else
'            txtPRNo.Locked = False
'        End If
'
'        If Mode = AddNewEdit Then
'            Select Case rsHeader.Status
'                Case adRecNew
'                    sbRS.Panels(2) = "New"
'                Case adRecModified
'                    sbRS.Panels(2) = "Modified"
'                Case Else
'                    sbRS.Panels(2) = ""
'            End Select
'        Else
'            sbRS.Panels(2) = ""
'        End If
'
'        GetChild
'
'        If rsHeader!lCancelled = True Then
'            sbRS.Panels(5) = "CANCELLED"
'        ElseIf rsHeader!lApproved Then
'            sbRS.Panels(5) = "APPROVED"
'        Else
'            sbRS.Panels(5) = ""
'        End If
'    Else
'        sbRS.Panels(1) = "Record: 0/0"
'        sbRS.Panels(2) = ""
'        txtPRNo.Locked = False
'    End If
'
'    If Mode = AddNewEdit Then
'        dtgPR.Refresh
'    End If
'
'ErrorHandler:
'    'Err.Number -2147217885
'    'Description - Row handle referred to a deleted row or a row marked for deletion.
'    If Err.Number = -2147217885 Then
'        Resume Next
'    End If
'
'End Sub
'
'Private Sub Timer1_Timer()
'    If Mode = AddNewEdit Then
'        SSTab1.TabEnabled(1) = False
'    Else
'        SSTab1.TabEnabled(1) = True
'    End If
'End Sub
'
'Private Sub txtPRNo_LostFocus()
'    'Does Code Already Exist
'    If Mode = AddNewEdit Then
'        If Trim(txtPRNo) = "" Then
'            MsgBox "Empty primary input.", vbInformation, "ComUnion"
'            txtPRNo.SetFocus
'        Else
'            If rsHeader.Status <> adRecNew Then Exit Sub
'            txtPRNo = Trim(txtPRNo)
'            If IDExisting(rsHeader, "cPRNo", "REQUISITION", Trim(rsHeader!cPRNo)) Then
'                MsgBox "Requisition No. already exist.", vbInformation, "ComUnion"
'                txtPRNo.SetFocus
'            End If
'        End If
'    End If
'End Sub
'
''Check if all mandatory fields are complete
'Function MandatoryOK() As Boolean
'
'    MandatoryOK = True
'
'    If Trim(txtPRNo) = "" Then
'        MandatoryOK = False
'        MsgBox "Field 'Requisition Number' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
'        txtPRNo.SetFocus
'        Exit Function
'    End If
'
'    If rsHeader.Status = adRecNew And lSystemGenerated = False Then
'        If IDExisting(rsHeader, "cPRNo", "REQUISITION", Trim(rsHeader!cPRNo)) Then
'            MandatoryOK = False
'            MsgBox "Requisition No. already exist.", vbInformation, "ComUnion"
'            txtPRNo.SetFocus
'            Exit Function
'        End If
'    End If
'
'    'Required fields
'    If Trim(dtbDate.Text) = "__/__/____" Then
'        MandatoryOK = False
'        MsgBox "Field 'Transaction Date' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
'        dtbDate.SetFocus
'        Exit Function
'    ElseIf Trim(txtType) = "" Then
'        MandatoryOK = False
'        MsgBox "Field 'Type' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
'        cboType.SetFocus
'        Exit Function
'    ElseIf Trim(cboType) = "From SO" Then
'        If Trim(txtRefNo) = "" Then
'            MandatoryOK = False
'            MsgBox "Field 'Reference No.' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
'            txtRefNo.SetFocus
'            Exit Function
'        End If
'    ElseIf Trim(txtRequestedBy) = "" Then
'        MandatoryOK = False
'        MsgBox "Field 'Requested by' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
'        txtRequestedBy.SetFocus
'        Exit Function
'    End If
'
'    GetChild
'
'    'Transaction without details
'    If rsDetail.RecordCount = 0 Then
'        MandatoryOK = False
'        MsgBox "Cannot save transaction without details.", vbInformation, "ComUnion"
'        dtgPR.SetFocus
'        Exit Function
'    End If
'
'    If rsDetail.RecordCount <> 0 Then rsDetail.MoveFirst
'    Do Until rsDetail.EOF
'        If rsDetail.Status = (adRecNew) Or rsDetail.Status = (adRecModified) Then
'            If IsNull(rsDetail!cItemNo) Then
'                rsDetail.Delete
'            ElseIf Trim(rsDetail!cItemNo) = "" Then
'                rsDetail.Delete
'            Else
'                rsDetail.MoveNext
'            End If
'        Else
'            rsDetail.MoveNext
'        End If
'    Loop
'
'    GetChild
'
'    If rsDetail.RecordCount < 1 Then
'        MsgBox "Cannot save transaction without details.", vbExclamation, "ComUnion"
'        MandatoryOK = False
'        Exit Function
'    End If
'
'End Function
'
''Filter detail recordset to header's primary
'Private Sub GetChild()
'    rsDetail.Filter = "cPRNo = '" & Trim(rsHeader!cPRNo) & "'"
'End Sub
'
''Sets the form if record number is zero
'Private Sub RSZero()
'    sbRS.Panels(1) = "Record: 0/0"
'    sbRS.Panels(2) = ""
'    sbRS.Panels(4) = ""
'    sbRS.Panels(5) = ""
'
'    Set dtgPR.DataSource = Nothing
'    dtgPR.Refresh
'
'    Set FrmName = Me
'    UnbindControls
'    TextClearing
'    FormLocking True
'
'    If rsHeader.State = adStateOpen Then rsHeader.Close
'    If rsDetail.State = adStateOpen Then rsDetail.Close
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
'
'    txtPRNo.Locked = False
'    txtPRNo.SetFocus
'
'    Mode = Find
'
'End Sub
'
'Sub SearchObj(lEnable As Boolean)
'    dtbDate.Enabled = lEnable
'    cboType.Enabled = lEnable
'    cmdPickSO.Enabled = lEnable
'    dtbNeeded.Enabled = lEnable
'    cmdPickEmpCode.Enabled = lEnable
'    cmdPickDeptID.Enabled = lEnable
'End Sub
'
'
''Gets initital item values
'Private Sub GetInitialItemValues(RefRS As Recordset)
'    RefRS!cItemType = "Trade"
'    RefRS!cDesc = Trim(GetValueFrTable("cDesc", "ITEM", "cItemNo = '" & Trim(RefRS!cItemNo) & "'")) & ""
'    RefRS!cUnit = Trim(GetValueFrTable("cPrimaryUnit", "ITEM", "cItemNo = '" & Trim(RefRS!cItemNo) & "'")) & ""
'End Sub
'
''Gets initital asset values
'Private Sub GetInitialAssetValues(RefRS As Recordset)
'    RefRS!cItemType = "Asset"
'    RefRS!cDesc = Trim(GetValueFrTable("cDesc", "ASSET", "cAssetNo = '" & Trim(RefRS!cItemNo) & "'")) & ""
'    RefRS!cUnit = "Unit"
'End Sub
'
''Gets initital asset values
'Private Sub GetInitialSupplyValues(RefRS As Recordset)
'    RefRS!cItemType = "Supply"
'    RefRS!cDesc = Trim(GetValueFrTable("cDesc", "SUPPLY", "cSupplyNo = '" & Trim(RefRS!cItemNo) & "'")) & ""
'    RefRS!cUnit = Trim(GetValueFrTable("cUnit", "SUPPLY", "cSupplyNo = '" & Trim(RefRS!cItemNo) & "'")) & ""
'End Sub
'
'Private Function GetSearchString() As String
'On Error GoTo ErrorHandler
'Dim sWhere As String
'
'    GetSearchString = True
'
'    If Trim$(txtPRNo.Text) <> "" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cPRNo LIKE '" & Trim$(txtPRNo.Text) & "%'"
'    End If
'
'    If Trim$(dtbDate.Text) <> "__/__/____" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " dDate = '" & Trim$(dtbDate.Text) & "'"
'    End If
'
'    If Trim$(txtType.Text) <> "" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cType LIKE '" & Trim$(txtType.Text) & "%'"
'    End If
'
'    If Trim$(txtRefNo.Text) <> "" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cRefNo LIKE '" & Trim$(txtRefNo.Text) & "%'"
'    End If
'
'    If Trim$(dtbNeeded.Text) <> "__/__/____" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " dNeeded = '" & Trim$(dtbNeeded.Text) & "'"
'    End If
'
'    If Trim$(txtRequestedBy.Text) <> "" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cRequestedBy LIKE '" & Trim$(txtRequestedBy.Text) & "%'"
'    End If
'
'    If Trim$(txtDepartment.Text) <> "" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cDepartment LIKE '" & Trim$(txtDepartment.Text) & "%'"
'    End If
'
'    GetSearchString = Trim$(sWhere)
'
'    Exit Function
'ErrorHandler:
'    GetSearchString = "ERROR"
'End Function
'
'Private Sub txtRemarks_LostFocus()
'    If Mode <> AddNewEdit Then Exit Sub
'    If rsDetail.RecordCount = 0 Then TBNewLine
'End Sub
'
'Private Sub txtDepartment_Change()
'    txtDeptDesc = ""
'    txtDeptDesc = GetValueFrTable("Description", "SEC_DEPARTMENT", "DeptID = '" & Trim(txtDepartment) & "'", True)
'End Sub
'
'Private Sub txtDepartment_LostFocus()
'    If Mode <> AddNewEdit Then Exit Sub
'    If Trim(txtDeptDesc) = "" And Trim(txtDepartment) <> "" Then cmdPickDeptID_Click
'End Sub
'
'Private Sub txtRequestedBy_Change()
'    txtEmpName = ""
'    txtEmpName = GetValueFrTable("cEmpName", "EMPLOYEE", "cEmpCode = '" & Trim(txtRequestedBy) & "'")
'End Sub
'
'Private Sub txtRequestedBy_LostFocus()
'    If Mode <> AddNewEdit Then Exit Sub
'    If Trim(txtEmpName) = "" And Trim(txtRequestedBy) <> "" Then cmdPickEmpCode_Click
'End Sub
'
'Private Sub txtType_Change()
'    If Trim(txtType) <> "" Or txtType <> vbNullString Then
'        cboType = Trim(txtType)
'    Else
'        cboType.ListIndex = -1
'    End If
'End Sub
'
''Form list to grid
'Public Sub AddDetailsFromList()
'
'    GetChild
'
'    If Trim(cboType) = "From SO" Then
'        If rsDetail.RecordCount <> 0 Then
'            rsDetail.MoveFirst
'            Do Until rsDetail.RecordCount = 0
'                rsDetail.Delete adAffectCurrent
'                If rsDetail.RecordCount <> 0 Then rsDetail.MoveFirst
'            Loop
'        End If
'    End If
'
'    With frmARDRList.lvwList
'        For i = 1 To .ListItems.Count
'            If .ListItems(i).Checked = True Then
'                rsDetail.AddNew
'                rsDetail!cCompanyID = COID
'                rsDetail!cPRNo = Trim(rsHeader!cPRNo)
'                rsHeader!cRefNo = Trim(frmARDRList.mRefPK)
'                rsDetail!cType = "Existing"
'                rsDetail!cItemType = "Trade"
'                rsDetail!cItemNo = Trim(.ListItems(i).Text)
'                rsDetail!cDesc = Trim(.ListItems(i).SubItems(1))
'                rsDetail!cUnit = Trim(.ListItems(i).SubItems(3))
'                rsDetail!nQty = CDbl(.ListItems(i).SubItems(4))
'                rsDetail!nRefIdentity = CDbl(.ListItems(i).SubItems(7))
'                rsDetail!nFactor = CDbl(.ListItems(i).SubItems(8))
'                If Trim(cboType) = "From RS" Then
'                    rsDetail!cItemType = GetValueFrTable("cItemType", "REQUISITIONSLIP_T", "cTranNo = '" & rsHeader!cRefNo & "' AND nIdentity = " & rsDetail!nRefIdentity & " ")
'                    rsHeader!cRequestedBy = GetValueFrTable("cEmpCode", "REQUISITIONSLIP", "cTranNo = '" & rsHeader!cRefNo & "' ")
'                    rsHeader!cDepartment = GetValueFrTable("DeptID", "REQUISITIONSLIP", "cTranNo = '" & rsHeader!cRefNo & "' ")
'                End If
'            End If
'        Next i
'    End With
'
'    GetChild
'
'End Sub
'
''Change Transaction Number
'Sub ChangeTranNo(strTranNo As String)
'    GetChild
'
'    rsHeader!cPRNo = strTranNo
'    If rsDetail.RecordCount <> 0 Then rsDetail.MoveFirst
'    Do Until rsDetail.EOF
'        rsDetail!cPRNo = strTranNo
'        rsDetail.MoveNext
'    Loop
'
'    GetChild
'End Sub
'
''Clear Data Grid
'Private Sub ClearDataGrid()
'    GetChild
'    If rsDetail.RecordCount <> 0 Then
'        rsDetail.MoveFirst
'        Do Until rsDetail.RecordCount = 0
'            rsDetail.Delete adAffectCurrent
'            If rsDetail.RecordCount <> 0 Then rsDetail.MoveFirst
'        Loop
'    End If
'    GetChild
'End Sub
'
'Private Sub ClearDetails()
'    txtRefNo = Empty
'    dtbNeeded.Text = "__/__/____"
'    txtRequestedBy = Empty
'    txtDepartment = Empty
'    txtRemarks = Empty
'    ClearDataGrid
'End Sub
'
'Public Sub ShowForm(sTranNo As String)
'    If Mode = Find Then
'
'        OpenNewConnection connHeader
'        OpenNewConnection connDetail
'
'        Set rsHeader = Nothing
'        Set rsDetail = Nothing
'        Set rsHeader = New ADODB.Recordset
'        Set rsDetail = New ADODB.Recordset
'
'        OpenRecordsetWithCN rsDetail, "*", "REQUISITION_T", connDetail, "WHERE cPRNo = '" & Trim(sTranNo) & "'"
'        OpenRecordsetWithCN rsHeader, "*", "REQUISITION", connHeader, "WHERE cPRNo = '" & Trim(sTranNo) & "'"
'
'        Set FrmName = Me
'        FormLocking True
'
'        If rsHeader.RecordCount = 0 Then
'            FormWaitHide
'            MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
'            RSZero
'            FormSearch True
'            SearchObj True
'            Mode = Find
'            Exit Sub
'        End If
'            SetDataSource
'            SetDataField
'            txtPRNo.BackColor = &HE0FFFF
'            Mode = Normal
'            BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True, True
'
'    End If
'End Sub
'
